1
2
3
4
5
6
7
8
9 package ca.uhn.cache.impl;
10
11 import java.io.Serializable;
12
13 import ca.uhn.cache.IDimension;
14
15
16 /***
17 * Generic implementation of the <code>IDimension</code> interface.
18 *
19 * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
20 * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:33 $ by $Author: bryan_tripp $
21 */
22 public class Dimension extends CommonsLangObject implements IDimension, Serializable {
23
24 private final String myName;
25 private final Class[] myParamTypes;
26
27 /***
28 * Constructs a dimension instance.
29 *
30 * @param theName The name of the dimension.
31 * @param theParamTypes the types of the <code>IQueryParam</code>s that are meaningful along this dimension.
32 *
33 * @precondition theName != null
34 * @precondition theParamTypes != null
35 * @precondition theParamTypes.length > 0
36 */
37 public Dimension( String theName, Class[] theParamTypes ) {
38 assert theName != null;
39 assert theParamTypes != null;
40 assert theParamTypes.length > 0;
41
42 myName = theName;
43 myParamTypes = theParamTypes;
44 }
45
46 /***
47 * {@inheritDoc}
48 */
49 public String getName() {
50 return myName;
51 }
52
53 /***
54 * {@inheritDoc}
55 */
56 public Class[] getParamTypes() {
57 return myParamTypes;
58 }
59
60 }